package com.wenlin.myproduction.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @author 文琳
 * @time 2020/9/1 14:05
 * @desc
 */
public class NumberCard implements Parcelable {
    private int position;
    private int number;
    private String str;
    private boolean show;
    private boolean finish;

    public NumberCard(int number, String str) {
        this.number = number;
        this.str = str;
    }

    public NumberCard(int position, int number, String str) {
        this.position = position;
        this.number = number;
        this.str = str;
    }

    public int getPosition() {
        return position;
    }

    public void setPosition(int position) {
        this.position = position;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public String getStr() {
        return str;
    }

    public void setStr(String str) {
        this.str = str;
    }

    public boolean isShow() {
        return show;
    }

    public void setShow(boolean show) {
        this.show = show;
    }

    public boolean isFinish() {
        return finish;
    }

    public void setFinish(boolean finish) {
        this.finish = finish;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.position);
        dest.writeInt(this.number);
        dest.writeString(this.str);
        dest.writeByte(this.show ? (byte) 1 : (byte) 0);
        dest.writeByte(this.finish ? (byte) 1 : (byte) 0);
    }

    protected NumberCard(Parcel in) {
        this.position = in.readInt();
        this.number = in.readInt();
        this.str = in.readString();
        this.show = in.readByte() != 0;
        this.finish = in.readByte() != 0;
    }

    public static final Creator<NumberCard> CREATOR = new Creator<NumberCard>() {
        @Override
        public NumberCard createFromParcel(Parcel source) {
            return new NumberCard(source);
        }

        @Override
        public NumberCard[] newArray(int size) {
            return new NumberCard[size];
        }
    };
}
